package com.example.springbootdemo.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/calc")
public class CaloController {
    @RequestMapping("/sum")
    public String sum(Integer a, Integer b) {
        System.out.println(a + b);
        return "计算结果为: " + a + " + " + b + " = " + (a + b);
    }
}
